//
//  Landmark.swift
//  FuncFanc
//
//  Created by careate-hubing on 2021/12/15.
//  Copyright © 2021 huhu. All rights reserved.
//

import SwiftUI
import CoreLocation



@available(iOS 13.0, *)
struct Landmark: Hashable,Codable {
    var id: Int
    var name: String
    fileprivate var imageNmae: String
    fileprivate var coordinates: Coordinates
    var state: String
    var park: String
    var category: Category
    
    var locationCoordinate:CLLocationCoordinate2D{
        CLLocationCoordinate2D(
            latitude: coordinates.latitude, longitude: coordinates.longitude
        )
    }
    
    enum Category:String,CaseIterable,Codable,Hashable{
        case featured = "Featured"
        case lakes = "Lakes"
        case rivers = "Rivers"
    }
}

//@available(iOS 13.0, *)
//extension Landmark {
//    var image: Image {
////        ImageStore.shared.image(name: imageName)
//         
//    }
//}

struct Coordinates:Hashable,Codable{
    var latitude: Double
    var longitude: Double
}

